//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package commands;

import common.ByteStream;

public class CollectFruits extends LogicCommand {
    private final int cmdId = 62;
    private final int fruitInstanceId;
    private final int fruitIndex;

    public CollectFruits(int tt, int fruitId, int fruitIndex) {
        super(tt);
        this.fruitInstanceId = fruitId;
        this.fruitIndex = fruitIndex;
    }

    public int getCommandId() {
        return 62;
    }

    public void encode(ByteStream stream) {
        stream.writeInt(62);
        stream.writeInt(this.fruitInstanceId);
        stream.writeShort(this.fruitIndex);
        stream.writeInt(this.ticksWhenTouch().intValue());
    }
}
